chsecurity
使用 chsecurity 指令可變更系統的 Secure Sockets Layer (SSL)、安全 Shell (SSH) 或傳輸層安全 (TLS) 安全設定。
語法
參數
記住: 這些參數互斥。您必須指定 -sslprotocol 或 -sshprotocol 其中一個,不能同時指定。
- -sslprotocol security_level
- (必要)指定 SSL 安全層次設定的數值,可以為
1到4的任何值。設定3為預設值。使用下列 sslprotocol 安全層次設定。1不容許使用 SSL 3.0。2只容許使用 TLS 1.2。3另外還不容許使用非專用於 1.2 的 TLS 1.2 密碼組合。4另外還不容許使用 RSA 金鑰交換密碼。
- -sshprotocol security_level
- (必要)指定 SSH 安全層次設定的數值,可以為
1或2的值。設定1為預設值。使用下列 sshprotocol 安全層次設定。1容許下列金鑰交換方法。- curve25519-sha256
- curve25519-sha256@libssh.org
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group14-sha256
- diffie-hellman-group14-sha1
- diffie-hellman-group1-sha1
- diffie-hellman-group-exchange-sha1
2容許下列金鑰交換方法:- curve25519-sha256
- curve25519-sha256@libssh.org
- ecdh-sha2-nistp256
- ecdh-sha2-nistp384
- ecdh-sha2-nistp521
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group16-sha512
- diffie-hellman-group18-sha512
- diffie-hellman-group14-sha256
- diffie-hellman-group14-sha1
說明
此指令將變更系統上的 SSL、SSH 或 TLS 安全設定。重要: 如果您使用 SSL 或 TLS,變更安全性可能會中斷這些服務。
如果發生中斷,請使用此程序。
- 請等待 5 分鐘,然後再試一次。(等待所有服務重新啟動。)
- 確認 SSL 或 TLS 實作處於最新狀態,且支援指定的安全層次。
- 必要的話,請回復至 SSL 或 TLS 安全的先前版本。
呼叫範例
chsecurity -sslprotocol 4結果輸出
Changing the SSL security level could disable the GUI connection on old web browsers,
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (輸入 y/yes 以確認)
呼叫範例
chsecurity -sshprotocol 2結果輸出
Changing the SSL security level could disable the GUI connection on old web browsers,
and changing the SSH security level may logout existing SSH sessions. Are you sure you wish to continue? (輸入 y/yes 以確認)
